package com.snowfield.lb47.lbconfig.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 服务器证书对象 config_backserver_crt
 *
 * @author snowfield
 * @date 2024-03-25
 */
public class BackserverCrt extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 标识ID
     */
    private Long id;

    /**
     * 证书名称
     */
    @Excel(name = "证书名称")
    private String crtName;

    /**
     * 端口
     */
    @Excel(name = "端口")
    private Long crtPort;

    /**
     * 证书路径
     */
    private String crtPath;

    /**
     * 服务器ID
     */
    @Excel(name = "服务器ID")
    private Long serverId;

    /**
     * 状态（0正常 1关闭）
     */
    @Excel(name = "状态", readConverterExp = "0=正常,1=关闭")
    private String status;

    /**
     * 证书上传路径 ,前后端传递参数使用，不持久化
     */
    private String crtUploadPath;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setCrtName(String crtName) {
        this.crtName = crtName;
    }

    public String getCrtName() {
        return crtName;
    }

    public void setCrtPort(Long crtPort) {
        this.crtPort = crtPort;
    }

    public Long getCrtPort() {
        return crtPort;
    }

    public void setCrtPath(String crtPath) {
        this.crtPath = crtPath;
    }

    public String getCrtPath() {
        return crtPath;
    }

    public void setServerId(Long serverId) {
        this.serverId = serverId;
    }

    public Long getServerId() {
        return serverId;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public String getCrtUploadPath() {
        return crtUploadPath;
    }

    public void setCrtUploadPath(String crtUploadPath) {
        this.crtUploadPath = crtUploadPath;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("crtName", getCrtName())
                .append("crtPort", getCrtPort())
                .append("crtPath", getCrtPath())
                .append("serverId", getServerId())
                .append("status", getStatus())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
